40823112 cd2021

  • Home
    • Site Map
    • reveal
    • blog
  • Introduction
  • Collaboration
  • Stage 1
    • W1
      • 利用SSH維護倉儲
      • 建立倉儲
      • 建立Leo編輯Palican
      • 協同倉儲
    • W2
      • Project production
      • 手繪草稿
      • 初步設計與討論
    • W3
      • 錯誤排解 齒輪方向與速度
      • 錯誤排解 傳動改正
      • 產品簡化
      • 完成品
    • W4
      • 2D工程圖
      • 3D爆炸圖
      • 產品設計報告與影片
  • Stage 2
    • W5
      • Stage2 Grouping
      • 進度規劃
    • W6
      • 討論
    • W7
      • Coppeliasim方向鍵操控模擬
      • 模擬問題與排解
    • W8
      • Coppeliasim避障自走車
      • 模擬問題和排解
    • W9
      • 產品報告與模擬影片
  • Stage 3
    • W10
      • Task 1
    • W11
      • task 2-1
      • task 2-2
    • W12
      • 上課直播
    • W13
      • 小組meeting直播
      • RobotDK
    • W14
      • MTB_Robot
    • W15
      • Geometry Translation
      • Algebra Translation
    • W18
    • Final Project
  • W16
  • Product Install
    • stage1-ag10
    • stage2-ag1
    • stage3-ag1
W15 << Previous Next >> Algebra Translation

Geometry Translation

Inverse kinematics for a 2-joint robot arm using geometry 翻譯

0:05
We saw this simple two-link robot in the previous lecture about forward kinematics.

我們在上一堂關於正向運動學的課程中看到這個簡單的雙連桿機構。

Kinematics : 運動學

0:10

The tooltip pose of this robot is described simply by two numbers, the coordinates x and y with respect to the world coordinate frame.

該機構的提示框由兩個數字簡單描述,相對於世界坐標系的坐標 x 和 y。

Tooltip : 提示框

0:19

So, the problem here is that given x and y, we want to determine the joined angles, q1 and q2.

所以,這裡的問題是給定x和y,我們要判斷連接角q1和q2。

0:25

The solution that we’re going to follow in this particular section is a geometric one.

我們利用特定幾何來解決此方案。

0:29

We’re going to start with a simple piece of construction.

我們從一個簡單的結構開始。

0:31

We’re going to overlay the red triangle on top of our robot.

我們在機構上覆蓋紅色三角形。

0:35

We know that the end point coordinate is x, y, so the vertical height of the triangle is y, the horizontal width is x.

我們知道終點坐標是x,y,所以三角形的垂直高度是y,水平寬度是x。

0:43

And, using Pythagoras theorem, we can write r squared equals x squared plus y squared.

利用畢氏定理(Pythagorean theorem),我們可寫出 r² = x ²+ y²

0:50

So far, so easy.

到目前為止很容易。

0:51

Now, w’re going to look at this triangle highlighted here in red and we want to determine the angle alpha.

現在,我們查看此凸顯的紅色三角形,並確定α角。

0:58

In order to do that, we need to use the cosine rule.

為了做到這一點,我們須使用餘弦定理 (Law of cosines)。

1:01

And, if you’re a little rusty on the cosine rule, here is a bit of a refresher.

如果你對餘弦定理有點生疏,這裡幫以複習一點點。

1:06

We have an arbitrary triangle.

有一個任意三角形。

1:08

We don’t have any right angles in it and we’re going to label the length of this edge as A and the angle opposite that edge, we’re going to label as little a.

我們沒有任何的直角,將這邊的角度標為小a,而對邊的長度標為A。

1:16

And, we do the same for this edge and this angle, and this edge and this angle.

我們再對這邊和這個角,以及這邊和這個叫做同樣的事。

1:21

So, all together, the sides are labelled capitals A, B and C, and the angles are labelled little a, little b, and little c.

因此所有邊都標記為A, B, C,角都標記為a, b, c 。

1:30

So, the cosine rule is simply this relationship here.

餘弦定理就是這種關係。

1:33

It’s a bit like Pythagoras’ theorem except for this extra term on the end with the cos a in it.

它有點像畢達哥拉斯定理,除了末尾有cos a。

1:39

Now, let’s apply the cosine rule to the particular triangle we looked at a moment ago.

將餘弦定理應用在剛看到的特定三角形。

1:45

It’s pretty straightforward to write down this particular relationship.

寫下此特殊關係很簡單。

1:48

We can isolate the term cos alpha which gives us the angle alpha that we’re interested in.

我們可分離出 cosα ,它給我們需要的α角度。

1:53

And, it’s defined in terms of the constant link lengths, A1 and A2 and the position of the end effector, x and y.

它是根據恆定連趕長度A1和A2以及末端執行器的位置x和y定義。

2:02

We can write this simple relationship between the angles alpha and q2.

我們可寫出角度α和q2之間的簡單關係。

2:07

And, we know from the shape of the cosine function that cos of q2 must be equal to negative of cos alpha.

並且我們從餘弦函數中得知cos q2必須等於 –cos α。

2:13

This time, let’s just write an expression for the cosine of the joined angle q2.

寫餘弦在連接角q2的表達式。

2:18

Now, we’re going to draw yet another red triangle and we’re going apply some simple trigonometry here.

我們繪製另一個紅色三角形,並應用三角函數。

2:24

If we know q2, then we know this length and this length of the red triangle.

如果我們知道q2,就可知道這個長度和這個三角形的長度。

2:29

We can write this relationship for the sine of the joined angle q2.

我們可以在連接角q2寫出正弦關係。

2:33

Now, we can consider this bigger triangle whose angle is beta and this side length of this triangle is given here in blue.

現在我們考慮這個大三角形,角度是β,此三角形的邊長由藍色表示。

2:42

And, the length of the other side of the triangle is this.

且三角形另一邊長度是這個。

2:45

So, now we can write an expression for the angle beta in terms of these parameters here.

我們可在此根據參數寫出角度β的表達式。

2:52

Going back to the red triangle that we drew earlier, we can establish a relationship between q1 and the angle beta.

回到之前畫的三角形,我們可建立出q1和β的關係。

2:59

Introduce yet another angle, this one gamma and we can write a relationship between the angle gamma and the tooltip coordinates x and y.

引入另一個角度ɣ,可寫出角度ɣ和提示座標x和y之間的關係。

3:09

Now, we can write a simple relationship between the angles that we’ve constructed, gamma and beta and the joined angle we’re interested in which is q1.

現在我們可建構出角度β和ɣ與連接角度q1之間的關係。

3:17

And, the total relationship looks something like this.

而且,整個關係看起來像這樣。

3:20

Quite a complex relationship, it gives us the angle of joined one, that’s q1 in terms of the end effector coordinates y and x, and a bunch of constants, a1 and a2, and it’s also a function of the second joint angle, q2.

相當複雜的關係,它提供連接的角度,即末端執行器坐標 y 和 x 的 q1,以及一系列常數 a1 和 a2,它也是第二個關節角度 q2 的函數。

3:36

So, let’s summarize what it is that we have derived here.

所以,總結我們在這裡得出了什麼。

3:40

We have an expression for the cosine of q2 and we have an expression for q1.

我們有q1和cosq2方程式。

3:45

Now, the cosine function is symmetrical about 0.

餘弦函數在0對稱。

3:49

So, if we know the value of the cosine of q2, then there are two possible solutions a positive angle and a negative angle.

所以我們知道cosq2的值可能為正角和負角。

3:57

We’re going to explicitly choose the positive angle. Which means that I can write this expression here.

我們選擇正角,表示我可以寫出此表達式。

4:03

And now, we have what we call the inverse kinematic solution for this two-link robot.

現在我們能用逆向運動學來解決雙連桿機構。

4:08

We have an expression for the two joined angles, q1 and q2 in terms of the end effector pose x and y, and a bunch of constants.

我們有兩個連接角 q1 和 q2 的表達式,根據末端執行器x 和 y 以及一系列常量。

4:17

You notice that the two equations are not independent.

注意到兩方程式不是獨立的。

4:19

The equation for q1, in fact, depends on the solution for q2.

事實上,q1方程式取決於q2的解。

4:23

In this case, q2 is negative and we’re going to write the solution for q2 with a negative sign in front of the inverse cosine.

在這情況下,q2為負,我們將在q2反餘弦的解錢加上負號。

4:32

Now, we need to solve for q1, so we’re going to introduce this particular red triangle, the angle beta that we solved previously, and the angle gamma which is defined in terms of y and x.

我們需求解q1,因此采用這個特定的三角形,之前求解的角度β以及根據y和x定義的角度ɣ。

4:44

Now, we write a slightly different relationship between q1, gamma and beta, different to what we had before.

q1、ɣ和β之間的關西,和之前求的不同。

4:50

There’s a change of sign involved.

涉及到符號的變化。

4:51

Then, we can substitute all that previous equation and come up with this expression for q1.

然後我們可代換之前所有等式,並求得此q1表達式。

4:56

Again, there is a change of sign here.

同樣,這裡的符號發生了變化。

4:58

Previously, this was a negative sign.

先前,這是個負號。

5:01

And, here in summary form is the solution for the inverse kinematics of our two-link robot when it is in this particular configuration, where q2 is negative.

這是雙連桿機構在此逆向運動學的總形式,其中q2為負。

5:10

Let’s compare the two solutions, the case where q2 is positive and the case where q2 is negative.

讓我們比較兩個解決方案,q2為正和q2為負的情況。


W15 << Previous Next >> Algebra Translation

Copyright © All rights reserved | This template is made with by Colorlib